package xxx;

import java.io.*;
import java.net.ServerSocket;
import java.net.Socket;
import java.util.ArrayList;
import java.util.List;

public class communicationServer {
    public static List<Socket> online = new ArrayList<>();
    public static void main(String[] args) {
        try {
            ServerSocket serverSocket = new ServerSocket(9999);
            while (true) {
                Socket socket = serverSocket.accept();
                online.add(socket);
                new ServerThread(socket).start();
            }
        } catch (Exception e) {
            e.printStackTrace();
        }

    }

}
